package com.lancea12.buster.android;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class ChooserActivity extends Activity {
    /** Called when the activity is first created. */
    
    private Button brainButton;
    private Button controllerButton;
    private TextView tv;
    private Resources res;
    private String userId = null;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.chooser);
        
        res = getResources();
        
        brainButton = (Button)findViewById(R.id.brainButton);
        brainButton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				startBrainActivity();	
			}
		});
        
        controllerButton = (Button)findViewById(R.id.controllerButton);
        controllerButton.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				startControllerActivity();	
			}
		});
        
        
        /*if (userId == null){
    		Intent loginIntent = new Intent(this, LoginActivity.class);
    		startActivity(loginIntent);
        }*/
    }
    
	private void startBrainActivity() {
		Intent launchNewActivity = new Intent(this, RobotActivity.class);
		startActivity(launchNewActivity);
	}
    
	private void startControllerActivity() {
		Intent launchNewActivity = new Intent(this, ControllerActivity.class);
		startActivity(launchNewActivity);
	}
    
}